﻿using System;
using System.Linq;
using System.Collections.Generic;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;

using Ah.Testudin.Engine.Graphics.Scenes;
using Ah.Testudin.Engine.Events;

namespace Ah.Testudin.Engine.UI.Elements
{
    public class SceneScreenElement : ScreenElementBase
    {
        #region Private Member Variables

        private readonly Scene _scene;

        #endregion

        #region Constructors

        public SceneScreenElement(
            Vector2 position,
            int width,
            int height,
            Scene scene)
            : base(position, width, height)
        {
            if (scene == null)
            {
                throw new ArgumentNullException("scene");
            }

            _scene = scene;
        }

        #endregion

        #region ScreenElementBase

        public override short ZOrder
        {
            get { return 0; }
        }

        public override bool Visible
        {
            get { return true; }
        }

        public override bool ProcessInput()
        {
            return false;
        }

        public override void Update(GameTime gameTime)
        {
            _scene.Update(gameTime);
        }

        public override void Render()
        {
            _scene.Render();
        }

        #endregion
    }
}
